package com.moloon.game.sanguo.editor.propseditor.view.mission;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.SectionPart;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;

public class MissionRequirementSection extends SectionPart {

	private Table table_3;
	private Table table_2;
	private Text text_5;
	private Table table_1;
	private Table table;
	private Text text_4;
	private Text text_3;
	private Text text_2;
	private Text text_1;
	private Text text;
	/**
	 * Create the SectionPart
	 * @param parent
	 * @param toolkit
	 * @param style
	 */
	public MissionRequirementSection(Composite parent, FormToolkit toolkit,
			int style) {
		super(parent, toolkit, style);
		createClient(getSection(), toolkit);
	}

	/**
	 * Fill the section
	 */
	private void createClient(Section section, FormToolkit toolkit) {
		section.setText("任务要求");
		Composite container = toolkit.createComposite(section);
		final GridLayout gridLayout = new GridLayout();
		gridLayout.numColumns = 4;
		container.setLayout(gridLayout);
		//
		section.setClient(container);

		toolkit.createLabel(container, "与NPC对话:", SWT.NONE);

		text = toolkit.createText(container, null, SWT.NONE);
		text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));

		toolkit.createLabel(container, "对话内容:", SWT.NONE);

		text_1 = toolkit.createText(container, null, SWT.NONE);
		text_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 4));

		toolkit.createLabel(container, "充值金额:", SWT.NONE);

		text_2 = toolkit.createText(container, null, SWT.NONE);
		text_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
		new Label(container, SWT.NONE);

		final Label label = toolkit.createLabel(container, "PK胜利场次:", SWT.NONE);
		label.setLayoutData(new GridData());

		text_3 = toolkit.createText(container, null, SWT.NONE);
		text_3.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
		new Label(container, SWT.NONE);

		final Label label_1 = toolkit.createLabel(container, "时间限制:", SWT.NONE);
		label_1.setLayoutData(new GridData());

		text_4 = toolkit.createText(container, null, SWT.NONE);
		text_4.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
		new Label(container, SWT.NONE);

		final Section section_1 = toolkit.createSection(container, Section.TWISTIE | Section.TITLE_BAR | Section.EXPANDED);
		section_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
		section_1.setText("打怪");

		final Composite composite = toolkit.createComposite(section_1, SWT.NONE);
		composite.setLayout(new GridLayout());
		section_1.setSeparatorControl(composite);
		toolkit.paintBordersFor(composite);

		table_2 = toolkit.createTable(section_1, SWT.NONE);
		section_1.setClient(table_2);
		table_2.setLinesVisible(true);
		table_2.setHeaderVisible(true);

		final TableColumn newColumnTableColumn = new TableColumn(table_2, SWT.NONE);
		newColumnTableColumn.setWidth(100);
		newColumnTableColumn.setText("种类");

		final TableColumn newColumnTableColumn_1 = new TableColumn(table_2, SWT.NONE);
		newColumnTableColumn_1.setWidth(100);
		newColumnTableColumn_1.setText("数量");

		final Section section_2 = toolkit.createSection(container, Section.TWISTIE | Section.TITLE_BAR | Section.EXPANDED);
		section_2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
		section_2.setText("收集物品");

		table_3 = toolkit.createTable(section_2, SWT.NONE);
		section_2.setClient(table_3);
		table_3.setLinesVisible(true);
		table_3.setHeaderVisible(true);

		final TableColumn newColumnTableColumn_2 = new TableColumn(table_3, SWT.NONE);
		newColumnTableColumn_2.setWidth(100);
		newColumnTableColumn_2.setText("种类");

		final TableColumn newColumnTableColumn_3 = new TableColumn(table_3, SWT.NONE);
		newColumnTableColumn_3.setWidth(100);
		newColumnTableColumn_3.setText("数量");

	}

}
